<?php

namespace app\common;

class Code
{
    const ERROR = 0;//失败
    const ERROR_POST = 206;//失败
    const WARNING = 500;//警告
    const SUCCESS = 200;//成功
    const SUCCESS_201 = 201;//成功
    const SUCCESS_202 = 202;//成功
    const SUCCESS_203 = 203;
    const SUCCESS_204 = 204; //token 问题
    const DISTANCE = 505;//用户配送距离不对，返回特殊 code
    const TOKEN_ERROR = 205;
    const TOKEN_EXPIRE = 205;
    const TOKEN_NOT_FOUND = 205;
    const SIGN_ERROR = 410;
    const USER_PWD_ERROR = 420;
    const USER_NAME_ERROR = 421;

    const ERROR_400 = 400;
    const ERROR_401 = 401;
    const ERROR_402 = 402;


    const CACHE_TOKEN = "user_token:";
    const CACHE_WECHAT_SESSION = "wechat_session:";
    const CACHE_WECHAT_ACCESS_TOKEN = "wechat_access_token";
    const CACHE_WECHAT_SESSION_TTL = 60*60*24*3;


}